home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 1
/
NetNews Offline Volume 1.iso
/
news
/
fido
/
ger
/
amiprog
/
159
< prev
next >
Wrap
Internet Message Format
|
1996-03-16
|
2KB
From: Andreas_Trottmann@p6.f317.n301.z2.fido.sub.org (Andreas Trottmann)
Organization: I'm in the army now, oh-o-oh I'm in the army, now :
Path: f317.n301.z2.fidonet.org!not-for-mail
Newsgroups: fido.ger.amiprog
Subject: Re: reqtools-FRAGE
Message-ID: <MSGID_2=3A301=2F317.6=40fidonet_5F4EEA61@fidonet.org>
References: <MSGID_2=3A246=2F1416.45_305a1bed@fidonet.org>
Date: Fri, 22 Sep 1995 11:30:22 +0200
Am 15 Sep 95 schrieb Willi an ALLE:
Mid: 2:301/317.6@fidonet 5F4EEA61
Rid: 2:246/1416.45 305a1bed
WE> Wil sagen, ich hab nen Requester, der irgendwas sagt, und wieder ab-
WE> haut, wenn irgendwas passiert.
WE> also so ala
WE> RTBauAufRequester(Req1,"Ich dire HD55");
WE> Execute("Dir HD55:",NULL,NULL);
WE> RTZischAbRequester(Req1);
Yup! Geht sogar fast so einfach wie Du geschrieben hast ;-)
Hier ein Auszug aus reqtools.doc (mit rtFontRequest(), geht natuerlich auch mit
anderen)
-----------8<--------------8<--------------8<--------------8<------------
...
struct rtHandlerInfo *hinfo;
ULONG ret, mymask, sigs;
...
/* calculate our mask */
mymask = 1 << win->UserPort->mp_SigBit;
/* We use the RT_ReqHandler tag to cause the requester to return
after initializing.
Check the return value to see if this setup went ok. */
if (rtFontRequest (req, "Font", RT_ReqHandler, &hinfo, TAG_END)
== CALL_HANDLER) {
do {
/* Wait() if we can */
if (!hinfo->DoNotWait)
sigs = Wait (hinfo->WaitMask | mymask);
/* check our own message port */
while (msg = GetMsg (win->UserPort)) {
...
/* here we handle messages received at our windows IDCMP
...
port */
...
}
/* let the requester do its thing (remember to pass 'sigs') */
ret = rtReqHandler (hinfo, sigs, TAG_END);
/* continue this loop as long as the requester is up */
} while (ret == CALL_HANDLER)
/* when we get here we know the requester has finished, 'ret'
is the return code. */
...
}
else notify ("Error opening requester!");
...
----------->8-------------->8-------------->8-------------->8------------
In einem solchen Fall darf man sogar